<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<meta http-equiv="keywords" content="" />
		<meta http-equiv="description" content="" />
		<title>コントロールパネル</title>

		<link rel="stylesheet" href="./assets/styles/default.css" type="text/css" />
		<script src="assets/scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
		<script src="assets/scripts/menu.js" type="text/javascript"></script>
		<script src="assets/scripts/table.js" type="text/javascript"></script>

		<script src="assets/scripts/ui/jquery-ui-1.7.2.custom.js" type="text/javascript"></script>
		<link type="text/css" href="./assets/styles/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
		<script type="text/javascript" src="./assets/scripts/ui/ui.core.js"></script>
		
		<script type="text/javascript">
		$(function() {

			// メッセージのフェード
			$('.message').fadeIn("slow");

			// 戻るボタン押下
			$('#btn_back').click(function(){
				document.fm.mode.value = 'back';
				document.fm.submit();
			});
		});
		</script>	
		<!--時間制御開始 -->
		<script>
		$(document).ready(function(){  
			$("#m_date").wrDate();   
			$("#e_date").wrDate();  
		});

		$.extend({ 
			wrDate : function(objs) { 

			objs.each(function(i) { 
				//jQueryオブジェクトをトラバース  
				var inputObj = $(this); 
				inputObj.datepicker({
					changeMonth: true,
					changeYear: true,
					dateFormat: 'yy-mm-dd'
				}); //各jQueryオブジェクトにCalendarコントロール
			}); 
		}});

		$.fn.extend({ 
			wrDate : function() { 
			//wrDate jQueryプラグインの名前を定義します
			$.wrDate(this); //呼び出す前に、カスタムjQuery関数
		}});
		
		</script>	
		<script type="text/javascript">
			//更新
			function updateAction(){
				if(confirm('更新してよろしいですか？')){
					document.fm.mode.type="submit";
				}else{
					return false;
				}			
			} 
		</script>	
		<script>  
     		//chooseOne()函式，參數為觸發該函式的元素本身  
		     function chooseOne(cb){  
		         //先取得同name的chekcBox的集合物件  
		         var obj = document.getElementsByName("status");  
		         for (i=0; i<obj.length; i++){  
		             //判斷obj集合中的i元素是否為cb，若否則表示未被點選  
		             if (obj[i]!=cb) obj[i].checked = false;  
		             //若是 但原先未被勾選 則變成勾選；反之則變為未勾選  
		             //else  obj[i].checked = cb.checked;  
		             //若要至少勾選一個的話，則把上面那行else拿掉，換用下面那行  
		             else obj[i].checked = true;  
		         }  
		     }  
	  </script> 
	  <script type="text/javascript">
	  	function judgeStatus(){
			var status1 = document.getElementById("status1").value;
			var status2 = document.getElementById("status2").value;
			var status3 = document.getElementById("status3").value;
			var status4 = document.getElementById("status4").value;
			var status5 = document.getElementById("status5").value;
			var status6 = document.getElementById("status6").value;
			var status = document.getElementById("status").value;
			if(status == status1){
				document.getElementById("status1").checked = 'checked';
			}
			if(status == status2){
				document.getElementById("status2").checked = 'checked';
			}
			if(status == status3){
				document.getElementById("status3").checked = 'checked';
			}
			if(status == status4){
				document.getElementById("status4").checked = 'checked';
			}
			if(status == status5){
				document.getElementById("status5").checked = 'checked';
			}
			if(status == status6){
				document.getElementById("status6").checked = 'checked';
			}
		}
	  </script>
	</head>
	<body id="" onload="judgeStatus()">
{{ php }} include( MENU_FILE ); {{ /php }}
		<div id="header" class="clearfix"><div class="wrapper">
			<h1><a href="./">コントロールパネル</a></h1>
			<form id="form_logout" action="logout.php" method="post"><p>{{ $login.staff_name }} <input type="submit" id="button_logout" value="ログアウト" /></p></form>
		</div></div>

		<div id="container"><div class="wrapper">

			<h2>見積管理</h2>
			<ul class="submenu clearfix">
				<li><a href="consumer_index.php">顧客検索</a></li>								
				<li><a href="consumer_form.php">顧客登録</a></li>
				<li><a href="price_task.php">見積タスク一覧</a></li>
				<li><a href="price_check.php">見積検索</a></li>
				<li><a href="shop_index.php">商品マスタ</a></li>
			</ul><br/>

			<h3>参照结果</h3>	
			<h4>見積書一覧</h4>	
			<ul>			
				<li>＞ <a href="price_check.php">見積検索</a></li>
				<li>＞ <a href="price_task.php">見積タスクリスト</a></li>			
				<li>＞ <a href="shop_index.php">製品マスタデータの検索</a></li>
				<li>＞ <a href="shop_form.php">製品マスタデータ登録</a></li>
				<li>＞ <a href="price_book.php">価格書</a></li>
				<li>＞ <a href="price_resolution.php">価格決議書</a></li>
				<li>＞ <a href="consumer_price.php">顧客の価格リスト</a></li>
			</ul><br/>		
			<form name="fm" action="" method="post">
				<table class="formTable">
{{ foreach from=$pricelist key=k item=v }}
					<tbody>
						<tr>
							<th>見積NO</th>
							<td><input type="text" name="price_no" value="{{$v.price_no}}"  id="text_information" class="text" readonly /></td>
						</tr>
						<tr>
							<th>顾客ID</th>
							<td><input type="text" name="consumer_id" value="{{$v.consumer_id}}"  id="text_information" class="text" readonly /></td>
						</tr>
						<tr>
							<th>作成日</th>
							<td><input type="text" id="m_date" name="m_date" value="{{$v.m_date}}"  id="text_information" class="text" readonly /></td>
						</tr>
						<tr>
							<th>件名</th>
							<td><input type="text" name="pro_name" value="{{$v.pro_name}}"  id="text_information" class="text" readonly /></td>
						</tr>						
						<tr>
							<th>型号</th>
							<td><input type="text" name="category" value="{{$v.category}}"  id="text_information" class="text" readonly /></td>
						</tr>
						<tr>
							<th>作成者</th>
							<td><input type="text" name="producer" value="{{$v.producer}}"  id="text_information" class="text" readonly /></td>
						</tr>
						<tr>
							<th>承認者</th>
							<td>
								<input type="text" name="examiner" value="{{$v.examiner}}"  id="text_information" class="text" readonly />
							</td>
						</tr>
						<tr>
							<th>审批日</th>
							<td>
								<input type="text" id="e_date" name="e_date" value="{{$v.e_date}}" id="text_information" class="text" readonly />
							</td>
						</tr>
						<tr>
							<th>客先同意</th>
							<td>
								{{$v.opt}}							
							</td>
						</tr>
						<tr>
							<th>备注</th>
							<td>
								<input type="text" name="remark" value="{{$v.remark}}" id="text_information" class="text" readonly />
							</td>
						</tr>
{{ /foreach }}	
					</tbody>
				</table>
				<p class="button">
					<button type="button" class="submit" onclick="javascript:window.location.href='price_task.php'"><span>确定</span></button>
				</p>				
			</form>
			
		</div></div>
		
		<address>Copyright (C) SHIFT Inc. / All rights reserved</address>
	</body>

</html>